In order to ensure data integrity, a mechanism that preserves command order and prohibits data mangling may be implemented in a storage system. For example, processing of I/O (input/output) requests may include management of temporary locks on regions/portions of data stored in logical volumes of the storage system. Such a mechanism may be referred to as LBA (logical block addressing) region locking. LBA region locking may be utilized where multiple processes are accessing a storage volume. Conceptually, such a mechanism locks the LBA region that is currently accessed by one active command, so that no other command can inadvertently access the same LBA region, allowing shared access only under certain conditions.
There are various techniques for implementing region locking and some of the most popular techniques make use of balanced trees such as AVL trees, B-trees or the like. Balanced trees, especially AVL trees, are utilized because they provide good, but most importantly, predictive average and maximum response time, without pathological cases.
However, a balanced-tree based region locking scheme is commonly associated with relatively high overhead. As storage devices become faster and faster, the overhead introduced by such a balanced-tree based region locking scheme may become prohibitive, slowing down the system and preventing the overall system from getting the optimal performance. Therein lies the need to provide a method and system to overcome such shortcomings.